﻿using System.Web.UI.WebControls;
using System.Collections;

namespace NCC_SOP.app_codes
{
    public static class retrieveFunctions
    {
        public static string[] getSelectedItems(ListControl cbl)
        {
            ArrayList items = new ArrayList();
            foreach (ListItem li in cbl.Items)
            {
                if (li.Selected)
                {
                    items.Add(li.Value);
                }
            }
            return (string[])items.ToArray(System.Type.GetType("System.String"));
        }
    }
}